<?php
/**
 * 问答社区音频答案
*/
class Commwapaudio extends Base_Controller
{
    public function __construct()
    {
        parent::__construct();
        $this->load->model('commwap_model');
    }

    public function getAudio()
    {
        $post = $this->input->post();
        if (!isset($post['qid'])||!is_numeric($post['qid'])) $this->error('error: lack question id');
        else $qid = (int)$post['qid'];

        $res = $this->commwap_model->getAudio($qid);
        $this->success($res);
    }

    public function getMultiAudio()
    {
        $post = $this->input->post();
        if (!isset($post['qid'])||!is_numeric($post['qid'])) $this->error('error: lack question id');
        else $qid = (int)$post['qid'];

        $res = $this->commwap_model->getMultiAudio($qid);
        $this->success($res);
    }
}